<!-- Main content wrapper -->
    <div class="wrapper">
        
        <!-- Widgets -->
        <div class="widgets">
        <?php
        if(!empty($this->messages)) {
        foreach ($this->messages as $mes) {
            $name = '';
            if($mes['id_user'] == 0){
                $name = 'Administration';
            } else {
                $name = $mes['username'];
            }
            echo '<div class="widget">';
            echo '<div class="title"><h6>'.date("d-m-Y H:i",strtotime($mes['date_message'])).' от '.$name.'</h6><div class="clear"></div></div>';
            echo '<p>'.$mes['message'].'</p>';
            echo '</div>';
        }
        }
        ?>
		
		<div class="widget">
                    <div class="formRow" style="border-bottom-style: none;";>
                        <label>Новое сообщение:</label>
                        <div class="formRight"><textarea rows="8" cols="150" name="textarea"></textarea></div>
                    </div>
					<input type="submit" value="Послать" class="button basic" style="margin-left:83%; margin-top:20px; margin-bottom:20px;"/>
                </div>
				</div>
        </div>
    	